Benefits:
- improved usability
- less wasted bandwith, when browsing to deeply nested items
- cleaner than existing implementations that require all menu items to be set as expanded in every page(see sp_ajax)
My idea:
The new feature should be built upon the current system, which would serve as fallback in case of missing javascript support or outdated browser.
The javascript should add clickable widgets (a plus sign or an arrow) on the left of menu items with children, ie. the menus we want to expand/collapse.
When the witdget is clicked it should get the children with an AJAX request, when it's clicked again it should just hide them.
When an expandable menu item is clicked, then it would behave like it does now: the appropriate page is loaded and all his children are shown.
Comments
Comment #1
Crell commentedYep, great feature. There's already several contrib modules that offer it. You can take your pick which one you want to use, as I've not tried any of them yet.
Comment #2
Egon Bianchet commentedYes, but as I said, I think the approach by sp_ajax isn't good (ie. loading an expanded menu tree and then collapsing it by css) because you can see the original menu flashing for a second while loading.
I completely missed activemenu, which uses the same technique I suggested. Isn't something like that worth cosidering for inclusion in core, as an usability improvement?
Comment #3
chx commentedThis is being worked on as an SoC project.
Comment #4
bradlis7 commented+1 for this
Comment #5
Crell commentedPretty sure this is available in Contrib. If not, then it should be in contrib, not Core. Closing.
Comment #6
queryblitz commentedlol